class SystemConfigurationsController < ApplicationController
  
  # GET /system_configurations
  # GET /system_configurations.xml
  def index
    @system_configurations = SystemConfiguration.all

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @system_configurations }
    end
  end

  # GET /system_configurations/1
  # GET /system_configurations/1.xml
  def show
    @system_configuration = SystemConfiguration.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.xml  { render :xml => @system_configuration }
    end
  end

  # GET /system_configurations/new
  # GET /system_configurations/new.xml
  def new
    @system_configuration = SystemConfiguration.new

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @system_configuration }
    end
  end

  # GET /system_configurations/1/edit
  def edit
    @system_configuration = SystemConfiguration.find(params[:id])
  end

  # POST /system_configurations
  # POST /system_configurations.xml
  def create
    @system_configuration = SystemConfiguration.new(params[:system_configuration])

    respond_to do |format|
      if @system_configuration.save
        flash[:notice] = 'SystemConfiguration was successfully created.'
        format.html { redirect_to(@system_configuration) }
        format.xml  { render :xml => @system_configuration, :status => :created, :location => @system_configuration }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @system_configuration.errors, :status => :unprocessable_entity }
      end
    end
  end

  # PUT /system_configurations/1
  # PUT /system_configurations/1.xml
  def update
    @system_configuration = SystemConfiguration.find(params[:id])

    respond_to do |format|
      if @system_configuration.update_attributes(params[:system_configuration])
        flash[:notice] = 'SystemConfiguration was successfully updated.'
        format.html { redirect_to(@system_configuration) }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @system_configuration.errors, :status => :unprocessable_entity }
      end
    end
  end

  # DELETE /system_configurations/1
  # DELETE /system_configurations/1.xml
  def destroy
    @system_configuration = SystemConfiguration.find(params[:id])
    @system_configuration.destroy

    respond_to do |format|
      format.html { redirect_to(system_configurations_url) }
      format.xml  { head :ok }
    end
  end
end
